home *** CD-ROM | disk | FTP | other *** search
/ Leonardo the Inventor / Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso / LEOWINMV / DATABASE.DIR / 00365_Script_verifySearchResults < prev    next >
Text File  |  1996-03-28  |  985b  |  32 lines

  1. -- ---------------------------------------------------------------
  2. -- Handler verifySearchResults calls verifyIndex for all Index-es. 
  3.  
  4. on verifySearchResults firstCast, lastCast
  5.   repeat with C = firstCast to lastCast
  6.     put "--------------------------"
  7.     put "Verifying Index Field " & C
  8.     verifyindex field C 
  9.   end repeat
  10. end
  11.  
  12. -- ---------------------------------------------------------------
  13. -- Handler verifyIndex checks that each result in the 
  14. -- search index is actually the exact name of an article in the 
  15. -- browser.
  16.  
  17. on verifyIndex indexText
  18.   put field "BrowserTopics" into browserTopics
  19.   
  20.   set numLines = the number of lines of indexText
  21.   repeat with L = 1 to numLines
  22.     set theLine = line L of indexText
  23.     if theLine starts "*" then
  24.       set header = theLine
  25.       next repeat
  26.     end if
  27.     if NOT (BinSearchFirstItemInLine (browserTopics, theLine, ":")) then
  28.       put header
  29.       put theLine
  30.     end if
  31.   end repeat
  32. end